﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
using System.Collections.ObjectModel;

namespace TiebaSpider.Beans
{
    public class ForumThread : INotifyPropertyChanged
    {
        private string tid;

        public string Name { get; set; }
        public string TID
        {
            get
            {
                return tid;
            }
            set
            {
                tid = value;
                OnPropertyChanged(new PropertyChangedEventArgs("TID"));
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        public void OnPropertyChanged(PropertyChangedEventArgs e)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, e);
        }
    }

    public class ForumInformation
    {
        public long TotalPages { get; set; }
        public ObservableCollection<ForumThread> ThreadCache { get; set; }

        public ForumInformation()
        {
            TotalPages = 0L;
            ThreadCache = new ObservableCollection<ForumThread>();
        }
    }
}
